import React, { useEffect } from 'react'
import { BorderBox1 } from '@jiaminghi/data-view-react'
import * as echarts from 'ec5';

import Options from './options'

export default function Index() {

    useEffect(() => {
        // setLoad
        // 基于准备好的dom，初始化echarts实例
        var myChart = echarts.init(document.getElementById('trtcom'));
        // 绘制图表
        myChart.setOption(Options);
    }, [])
    return (
        <BorderBox1 style={{ flex: 4 }} >
            <div id="trtcom" style={{ width: '100%', height: '100%' }}></div>
        </BorderBox1>
    )
}
